Distributing Load with NGINX and Tomcat
For distributing load on a multi-server architecture using 4 servers:
- Server 1: NGINX configured for routing requests
- Server 2: Dedicated to the database
- Server 3: Tomcat running a Master Server, Router Server and other standard Platform components
- Server 4: Tomcat running Production Server 1 (PROD1)
- Server 5: Tomcat running Production Server 2 (PROD2)
The high level steps to use multiple servers include:
- Creating N number of production servers (by installing Tomcat and production server component on a virtual or physical machine).
- Configuring one or more NGINX servers to recognize each production server.
- Configuring Customer tenants with the Multi-Server Load attribute so that requests from users will span multiple servers dynamically. When this setting is enabled, Tomcat and Platform distribute user sessions across all available production sever components.
To install Platform instances on multiple hosts, verify that the Tomcat instances are installed on every machine that will run Platform components. When copying WAR files, copy only the components that you wish to run on particular machine. Make sure Production Server instances get WAR names that match component names: for example, you would need to rename prod1.war after copying it to a different host. In the example shown above, the following WAR files should be copied:
- Server 3: master.war,
rest.war,
router.war,search.war,storage.war,webapi.war - Server 4: prod1.war
- Server 5: prod2.war (renamed version of downloaded prod1.war)